import pyDes
import base64
data='hello world'
des=pyDes.des(b'12345678',pyDes.ECB,b'12345678',pad=None,padmode=pyDes.PAD_PKCS5)
ciphertext=des.encrypt(data.encode('utf-8'))
print(ciphertext)
print(str(base64.b64encode(ciphertext),encoding="UTF-8"))
plaintext=des.decrypt(ciphertext)
print(plaintext.decode('utf-8'))